const getCustomNavData=function(){
	let result={};
	uni.getSystemInfo({
		success(e){
			let myStatusBar=0;
			let myCustomBar=0;
			let myNvaMartom=0;
			let myNavHeight=0;
			let myNavWidth=0;
			let custom=uni.getMenuButtonBoundingClientRect();
			myStatusBar=e.statusBarHeight;
			myNavHeight=custom.height;
			myNavWidth=custom.width;
			myNvaMartom=custom.top-e.statusBarHeight;
			myCustomBar=(myNvaMartom*2 + custom.height)- 2;
			result.statusBar=myStatusBar*750/wx.getSystemInfoSync().windowWidth;//顶部状态栏高度
			result.customBar=(myCustomBar*750/wx.getSystemInfoSync().windowWidth)+12;//导航栏高度
			result.nvaMartom=myNvaMartom*750/wx.getSystemInfoSync().windowWidth;//胶囊上边距
			result.navHeight=myNavHeight*750/wx.getSystemInfoSync().windowWidth;//胶囊按钮高度
			result.navWidth=myNavWidth*750/wx.getSystemInfoSync().windowWidth;//胶囊按钮宽度
			result.navMarRight=750-(custom.right*750/wx.getSystemInfoSync().windowWidth);//胶囊右边距
			result.pageMagTop=result.customBar+result.statusBar;//页面内容距离顶部的上边距，导航栏全部高度
		}
	})
	return result
}
const showToast = function(msg, callback = function() {

}) {
	uni.showToast({
		title: msg,
		icon: 'none',
		duration: 2000,
		success(e) {
			setTimeout(function() {
				callback()
			}, 2000)
		}
	})
}
export default{
	getCustomNavData,
	showToast
}